﻿using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Data;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{
    public partial class TJLFDWB
    {
        public TJLFDWB()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VICC_STOCK();
            this.DataContext = MV;
            InitializeComponent();

        }

        public void FilterMaster_Click(object sender, RoutedEventArgs e)
        {
            string filter = "ART LIKE '%" + ART.Trim() + "%' AND FARBE LIKE '" + FARBE.Trim() + "%' AND FINISH LIKE '%" + FINISH.Trim() + "%'";
            cvMaster.CustomFilter = filter;
        }

        public void FilterMasterClear_Click(object sender, RoutedEventArgs e)
        {

            cvMaster.CustomFilter = null;
        }
        public override void NewCommand(object sender, RoutedEventArgs e)
        {
            TMV.EXEWI09(DTSTART,"F");
            Tracer.Info("", "已经更新完成");
             base.NewCommand(sender, e); 
        }

        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            SResult = TMV.LoadStock(DTSTART, LO, LB, ART, VAR);
            MergeData(SResult, false);
            base.QueryCommand(sender, e);
        }

        private void PrintCommand(object sender, RoutedEventArgs e)
        {

        }

    }
}
